package com.mostromas.ess.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 款式信息表
 */
@ApiModel(value = "Product对象",description = "款式详情实体类")
@TableName("mr_product")
@Data
public class Product implements Serializable {
    private static final long serialVersionUID = 7535912042432567567L;

    /**
     * 主键，分布式ID
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 款号
     */
    @ApiModelProperty(value = "款号")
    private String number;

    /**
     * 所属类别
     */
    @ApiModelProperty(value = "类别ID")
    private String categoryId;

    /**
     * 商品主图
     */
    @ApiModelProperty(value = "商品主图url")
    private String imageUrl;

    /**
     * 所属年份
     */
    @ApiModelProperty(value = "年份")
    private String year;

    /**
     * 所属季节
     */
    @ApiModelProperty(value = "季节")
    private String season;

    /**
     * 所属品牌
     */
    @ApiModelProperty(value = "品牌")
    private String brand;

    /**
     * 推荐文案
     */
    @ApiModelProperty(value = "款式推荐文案")
    private String remark;

    /**
     * 款式价格
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "款式价格")
    private ProductPrice price;

    /**
     * 款式细节图
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "款式细节图集合")
    private List<ProductStyle> styleList = Lists.newArrayList();
    /**
     * 款式颜色集合
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "款式颜色集合")
    private List<ProductColor> colorList = Lists.newArrayList();

    /**
     * 款式尺寸集合
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "款式尺寸集合")
    private List<ProductSize> sizeList = Lists.newArrayList();


    /**
     * 款式面料集合
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "款式面料集合")
    private List<Fabric> fabricList = Lists.newArrayList();

}
